home *** CD-ROM | disk | FTP | other *** search
- { MOUSE.LIB Test }
-
- uses Mouse,SVGA256,Txt;
-
- { ─────────────── MouseTest ─────────────── }
- procedure MouseTest;
- var B,X,Y:integer;
- St:string[3];
- begin
- if MouseInstall<>-1 then begin
- Writeln('Mouse driver not installed !');
- Halt(1);
- end;
- Bar(0,0,320,200,104);
- InstallFont(1,8,16,0,256,8,GetFontAddr(6)^);
- PrintColor(1,80, 55,64,2,'Position X:');
- PrintColor(1,80, 75,64,2,'Position Y:');
- PrintColor(1,80, 95,64,2,' Buttons:');
- PrintColor(1,20,150,80,2,'Mouse Test');
- PrintColor(1,20,170,80,2,'Copyright (C) 1994 Jou-Nan Chen');
- PrintColor(1,180,55,24,2,'160');
- PrintColor(1,180,75,24,2,'100');
- MouseInit(0,0,639,199,8,8);
- MouseCursor(1);
- repeat
- Str(MouseB,St); Bar(196,95,40,16,104); PrintColor(1,196,95,24,2,St);
- if MouseMove=1 then begin
- X:=MouseX shr 1;
- Str(X:3,St); Bar(180,55,40,16,104); PrintColor(1,180,55,24,2,St);
- Str(MouseY:3,St); Bar(180,75,40,16,104); PrintColor(1,180,75,24,2,St);
- end;
- until KeyPressed=1;
- MouseCursor(2);
- end;
-
- begin
- SetMode(1);
- MouseTest;
- SetMode(0);
- end.
-